package com.spx;

public class SpxPoint{
	public int x;
	public int y;

	public SpxPoint(){
		x = 0;
		y = 0;
	}
	
	public SpxPoint(SpxPoint point){
		setPoint(point);
	}

	public SpxPoint(int x,int y){
		setPoint(x, y);
	}

	public void setPoint(SpxPoint point){
		if(point!=null){
			this.x=point.x;
			this.y=point.y;
		}else{
			x = 0;
			y = 0;
		}
	}

	public void setPoint(int x,int y){
		this.x = x;
		this.y = y;
	}

	public int getX(){
		return x;
	}

	public int getY(){
		return y;
	}

	public boolean equals(SpxPoint point) {
		if(point == null){
			return false;
		}
		if((x != point.x) || (y != point.y)){
			return false;
		}
		return true;
	}
}